#include <stdio.h>
#include <stdlib.h>
int main (void){
   FILE *in,*out;
   double num; int status; char aa;
	int a,b,c,d;
   in = fopen("data.txt","r");
   out= fopen("data2.txt","w");
	status=fscanf(in,"%c",&aa);
    while(status !=EOF){
   
      
      	if  (aa >= '0'&& aa<= '9')
        a=a+1;
    	else if (aa >= 'A'&& aa<= 'Z')
        b=b+1;
      	else if (aa >= 'a'&& aa<= 'z')
   		c=c+1;
   		else if(aa !='\n')
   		d=d+1;
   		status=fscanf(in,"%c",&aa);
   }
    fprintf(out,"the number of small let is %d\n",a);
    fprintf(out,"the number of cap let is %d\n",b);
    fprintf(out,"the number of numbers is %d\n",c);
    fprintf(out,"the number of symbols is %d\n",d);
   fclose(in);  
   fclose(out); 
   system("PAUSE"); 
   return 0;
}

